#include "Functions.h"


int fct_A(int input) {
    int i;
    long int result = 0;
    for (i = 0; i < input; i++) {
        result += i;
    }
    return 1;
}

int fct_B(int input) {
    int i;
    long int result = 0;
    for (i = 0; i < input; i++) {
        result += i;
    }
    return 1;
}

int fct_C(int input) {    
    int result = 0;
    int i=0;
    while (input > 10) {
        i = i + 1;
        input = input / 2;
        result += i;
    }    
    return result;
}


bool resolution(int arg) {
     // Do something with arg
     bool response;
     if (arg%2 == 0) response = true;
     else response = false;
     return response;
}

int usr_main(int input) {
    int result = 0;
    bool direction = resolution(input);
    if (direction) {
       result = fct_A(input);
       input = 10000 - input;
       input = input / 4;
       result = fct_B(input);
    } else {
       result = fct_C(input);  
    }
    return result;
}
